<#assign pojo=oneToManyPojo.getOne()>
<#assign many=oneToManyPojo.getMany()>
<#assign ones=oneToManyPojo.getOnes()>
<#assign fields=pojo.getFilterdPojoFields()>
<#assign declarationName = pojo.importType(pojo.getDeclarationName())>
<#assign declarationNameFirstLetterLower = pojo.importType(pojo.getDeclarationNameFirstLetterLower())>
<#assign realPackageAndClassPath = "${pojo.getRealPackageAndClassPath()}">
<#assign masterid = pojo.getDeclarationNameFirstLetterLower()+"Id">
import {Component, OnInit} from '@angular/core';
import {FormBuilder} from '@angular/forms';

import {BaseFilter} from '../../../../base/components/BaseFilter';
import {${declarationName}Service} from '../../services/${declarationNameFirstLetterLower}.service';

@Component({
  selector: 'app-${declarationNameFirstLetterLower}-filter',
  templateUrl: './${declarationNameFirstLetterLower}-filter.component.html',
  styles: []
})
export class ${declarationName}FilterComponent extends BaseFilter implements OnInit {

  constructor(private fb: FormBuilder, private ${declarationNameFirstLetterLower}Service: ${declarationName}Service) {
    super();
  }

  /**
   * 初始化默认查询条件
   */
  getDefaultFilter() {
    return {};
  }


  ngOnInit() {
    this.filterForm = this.fb.group({
      keys: [null],
<#assign fields=pojo.getFilterdPojoFields()>
<#foreach field in fields>
<#if field.getIsSampleField()>
      ${field.getName()}: [null],
</#if>
</#foreach>
    });
    // this.flushData();
  }
}
